const http = require('http');
const fs = require('fs');

http
	.createServer(function (req, res) {
		const url = req.url;
		if (url === '/') {
			fs.readFile('./views/index.html', function (err, data) {
				if (err) {
					return res.end('404 NOT FOUND');
				}
				res.end(data);
			})
		}
	})
	.listen(3000, function () {
		console.log('runnning');
	})